package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Pdfl2 generated by hbm2java
 */
@Entity
@Table(name = "pdfl_2", uniqueConstraints = @UniqueConstraint(columnNames = "pdfl_2"))
public class Pdfl2 implements java.io.Serializable
{

    private Long id;
    private int version;
    private Pdfl1 pdfl1;
    private String username;
    private String operation;
    private Date optdate;
    private String pdfl2;
    private String pdflmc2;
    private Integer xssx;
    private Set<Pdxm> pdxms = new HashSet<Pdxm>( 0 );

    public Pdfl2()
    {
    }

    public Pdfl2( Long id, String pdfl2, String pdflmc2 )
    {
        this.id = id;
        this.pdfl2 = pdfl2;
        this.pdflmc2 = pdflmc2;
    }

    public Pdfl2( Long id,
                  Pdfl1 pdfl1,
                  String username,
                  String operation,
                  Date optdate,
                  String pdfl2,
                  String pdflmc2,
                  Integer xssx,
                  Set<Pdxm> pdxms )
    {
        this.id = id;
        this.pdfl1 = pdfl1;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.pdfl2 = pdfl2;
        this.pdflmc2 = pdflmc2;
        this.xssx = xssx;
        this.pdxms = pdxms;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "pdf_ID")
    public Pdfl1 getPdfl1()
    {
        return this.pdfl1;
    }

    public void setPdfl1( Pdfl1 pdfl1 )
    {
        this.pdfl1 = pdfl1;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "pdfl_2", unique = true, nullable = false, length = 10)
    public String getPdfl2()
    {
        return this.pdfl2;
    }

    public void setPdfl2( String pdfl2 )
    {
        this.pdfl2 = pdfl2;
    }

    @Column(name = "pdflmc_2", nullable = false, length = 50)
    public String getPdflmc2()
    {
        return this.pdflmc2;
    }

    public void setPdflmc2( String pdflmc2 )
    {
        this.pdflmc2 = pdflmc2;
    }

    @Column(name = "xssx")
    public Integer getXssx()
    {
        return this.xssx;
    }

    public void setXssx( Integer xssx )
    {
        this.xssx = xssx;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pdfl2")
    public Set<Pdxm> getPdxms()
    {
        return this.pdxms;
    }

    public void setPdxms( Set<Pdxm> pdxms )
    {
        this.pdxms = pdxms;
    }

}
